package com.darrenchan

import java.util.Date

object FuncDemo2 {
  def main(args: Array[String]): Unit = {
    val date = new Date()
    //特殊写法
    val logWithDateBound = log(date, _: String)
    logWithDateBound("message1")

    Thread.sleep(1000)

    logWithDateBound("message2")

    Thread.sleep(1000)

    logWithDateBound("message3")
  }

  def log(date: Date, message: String): Unit = {
    println(date + "----------" + message)
  }
}
